package com.student.model;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * SignInRecord entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "Sign_In_Record", schema = "dbo", catalog = "StudentManager")
public class SignInRecord implements java.io.Serializable {

	// Fields

	private Long signInId;
	private ClassInfo classInfo;
	private Timestamp signInTime;
	private String signInPerson;

	// Constructors

	/** default constructor */
	public SignInRecord() {
	}

	/** minimal constructor */
	public SignInRecord(Long signInId) {
		this.signInId = signInId;
	}

	/** full constructor */
	public SignInRecord(Long signInId, ClassInfo classInfo,
			Timestamp signInTime, String signInPerson) {
		this.signInId = signInId;
		this.classInfo = classInfo;
		this.signInTime = signInTime;
		this.signInPerson = signInPerson;
	}

	// Property accessors
	@Id
	@Column(name = "Sign_In_id", unique = true, nullable = false, precision = 18, scale = 0)
	@GeneratedValue
	public Long getSignInId() {
		return this.signInId;
	}

	public void setSignInId(Long signInId) {
		this.signInId = signInId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "Class_id")
	public ClassInfo getClassInfo() {
		return this.classInfo;
	}

	public void setClassInfo(ClassInfo classInfo) {
		this.classInfo = classInfo;
	}

	@Column(name = "Sign_In_Time", length = 23)
	public Timestamp getSignInTime() {
		return this.signInTime;
	}

	public void setSignInTime(Timestamp signInTime) {
		this.signInTime = signInTime;
	}

	@Column(name = "Sign_In_Person", length = 128)
	public String getSignInPerson() {
		return this.signInPerson;
	}

	public void setSignInPerson(String signInPerson) {
		this.signInPerson = signInPerson;
	}

}